﻿using System;
using System.ComponentModel.DataAnnotations;
using YFurion.Application;

namespace UpperComputer.Application
{
    public class LoginInOrOutLogDto : EntityDto
    {
        [Required, StringLength(50)]
        public string Account { get; set; }

        [RegularExpression(@"^[0-9]{15}$")]
        public long UserId { get; set; }

        [StringLength(50)]
        public string UserName { get; set; }

        public bool LoginInOrOut { get; set; }

        [RegularExpression(@"^((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}$")]
        public string Ip { get; set; }

        public DateTime OperationTime { get; set; }

        public bool IsExpired { get; set; }
    }
}
